package module

import "time"

type User struct {
	Id         int        `gorm:"AUTO_INCREMENT primary key" json:"id"`
	Account    string     `gorm:"quine" json:"account" form:"account"`
	Password   string     `json:"password"`
	Name       string     `json:"name" form:"name"`
	Phone      string     `json:"phone" form:"phone"`
	Money      float64    `json:"money"`
	Address    string     `json:"address"`
	Avator     string     `json:"avator"`
	Enabled    bool       `json:"enabled" form:"enabled"`
	RoleId     int        `json:"roleId" form:"roleId" gorm:"role_id" `
	CreateTime *time.Time `json:"createTime" gorm:"createTime"`
	UpdateTime *time.Time `json:"updateTime" gorm:"autoUpdateTime"`
	DeleteTime *time.Time `json:"deleteTime" gorm:"deleteTime"`
}

func (User) TableName() string {
	return "user"
}
